<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Admin\TeamAward;

class TeamAwardController extends Controller
{
    // 初始化 团队奖励
    public function iniAward(Request $request)
    {
        // 获取团队奖励 => 验证 -> 获取
        $Award = new TeamAward;
        $getAward = $Award->analyAward($request['id'] ? $request['id'] : 0);
        return $getAward;
    }

    // 提交 团队奖励
    public function awardSubmit(Request $request)
    {
        // 验证字段合法性 => 提交数据
        $Award = new TeamAward;
        $insertAward = $Award->insertAnlayArr($request['id'], $request['data']);
        return $insertAward;
    }
}
